package com.atguigu.tingshu.vo.album;

import com.atguigu.tingshu.model.album.AlbumAttributeValue;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

@Data
@Schema(description = "专辑属性值")
public class AlbumAttributeValueVo {

    @NotNull(message = "属性id不能为空")
    @Schema(description = "属性id")
    private Long attributeId;

    @NotNull(message = "属性值id不能为空")
    @Schema(description = "属性值id")
    private Long valueId;

    @Schema(description = "属性值名称")
    private String valueName;

    @Schema(description = "属性名称")
    private String attributeName;

    public AlbumAttributeValue toAlbumAttributeValue() {
        AlbumAttributeValue albumAttributeValue = new AlbumAttributeValue();
        albumAttributeValue.setAttributeId(this.attributeId);
        albumAttributeValue.setValueId(this.valueId);
        albumAttributeValue.setValueName(this.valueName);
        albumAttributeValue.setAttributeName(this.attributeName);
        return albumAttributeValue;
    }
}
